{% extends './layout.html' %}

{% block body %}
    <div>
{#    <a href="{{ url_for('reader_add') }}">Add</a>#}
    </div>
    <table class="table">
    <thead>
    <tr><th>标题</th><th>Icon</th><th>Operation</th></tr>
    </thead>
    {% for reader in readers %}
        <tr>
            <td><a href="{{ reader.media_url }}">{{ reader.title }}</a> </td>
            <td><img src="{{ reader.icon_url }}"></td>
            <td>
                {% if g.user.is_authenticated %}
                <a href="{{ url_for('reader.show', id=reader.id)}}">预览</a>
                <a href="{{ url_for('reader.delete', id=reader.id) }}">删除</a>
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </table>
{% endblock %}